<?php
require_once "TcAI.Api.php";
$type = $_POST['type'];
$param = isset($_POST['param']) ? $_POST['param'] : 0;
$image = TcAITool::base64EncodeImage('./timg3.jpg');
$oldImage = TcAITool::showBase64($image);
//实力化接口对象，图片需base64处理
$obj = new TcAIApi($type, $image, $param);
$res = $obj->start();
if ($res['status'] == 0) {
    $res['image'] = TcAITool::showBase64($res['image']);
}
echo json_encode($res);
